
#ifndef   __PINOUT_H__
#define   __PINOUT_H__

#define   PINOUT_PLAY_ALWAYS		0xFF

enum
{
	POUT_RELAY1,
	POUT_RELAY2,
	POUT_LED
}POUTUTS;

enum
{
	PINP_BTN
}PINPUTS;

void gpio_init ( void );
void gpio_drv ( void );
void pout_set ( unsigned char out_num, unsigned int signal, unsigned short f_sample /* ms */, unsigned char times_to_play );

void pout_pulse ( unsigned char out_num, unsigned char active_level, unsigned int pulse_time_ms );
void pout_out ( unsigned char out_num, unsigned char out_state );
signed char pout_read ( unsigned char out_num );

#define   PINOUT_RELAY_PULSE_3S(out) pout_set(out,0x3Fffffff,1,1) 
#define   PINOUT_LED_PULSE_200MS(out) pout_set(out,0xfffffffd,1,1) 

extern unsigned char gpio_inp;

#endif
